The subject matter herein relates to testing of web applications. Web applications are computer software applications that are accessed through a web browser over a network, such as the Internet or an intranet. Web applications can also refer to computer software applications that are hosted in a browser-controlled environment (such as a Java™ applet) or coded in a browser-supported language (such as JavaScript™, combined with a browser-rendered markup language like HTML (HyperText Markup Language)) and reliant on a conventional web browser to render the application executable. Web applications are popular due to the ubiquity of web browsers and the convenience of using a web browser as a client. Web applications can be updated and maintained without distributing and installing software on potentially thousands of client computers. Web applications also have inherent support for cross-platform compatibility, which is another reason for their popularity. Some common web applications include webmail, online retail sales, online auctions, wikis, and so on.
Before making a web application accessible over the network, it is important to test the web application to ensure that it functions properly. A common way to do this is to use “bots,” which are test utility classes. A test invokes the application programming interface (API) of the bots, which allow the bots to simulate user actions. The tests and bots together form a total web application verification system. The programming code used by the bots for each user interface (UI) must be written manually by programmers, based on the XPaths (XML Paths) of elements, such as buttons, form fields, etc.
A problem with this approach is that whenever the underlying code for a web application changes, for example, when the user interface changes and certain buttons, login boxes, etc. are added, removed, or moved to different parts of a web page, this changes the XPaths, and thus causes the web application tests to fail. As a result, the existing bots can no longer perform the necessary tests and the bot code must be rewritten based on the changed interface. This requires a significant amount of time and programming resources and becomes a tedious issue for the programmers. Also, significant portions of code are rewritten by software developers instead of being reused when testing other, similar, web applications.